<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    
    <meta http-equiv="content-language" content="zh-CN" />
    

    
    <meta name="viewport" content="width=device-width, initial-scale=0.5">
    

    
    <title>mac重装系统3系统设置</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js"></script>
    
    
    
    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css">

    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css">

    <link rel="stylesheet" href="/css/stylesheet.css">
    <link rel="stylesheet" href="/css/home.css">

    
    
        <style type="text/css">
        body { background-color: #fbf6ec;}
        </style>
    
    
                
        
        
            <link rel="stylesheet" href="/css/main.css"/>
        




        
        
        
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/github.min.css"  />
         
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
        
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/r.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/yaml.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/latex.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/matlab.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/mathematica.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/julia.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/julia-repl.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/powershell.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/bash.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/shell.min.js"></script>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/languages/python.min.js"></script>
        
        <script>hljs.initHighlightingOnLoad();</script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
     
     
</head>


<body>
    <script>
        window.addEventListener("resize", resizeThrottler, false);

        var resizeTimeout;
        function resizeThrottler() {
        
        if ( !resizeTimeout ) {
            resizeTimeout = setTimeout(function() {
            resizeTimeout = null;
            actualResizeHandler();
        
            
            }, 66);
        }
        }
        actualResizeHandler()
        function actualResizeHandler() {
                if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent))
                {
                    document.body.classList.add('mobile');
                }else{
                    document.body.classList.remove('mobile');  
                }
    }</script>

    
      
      
            <nav class="navbar navbar-default navbar-static-top" style="opacity: .9" role="navigation">
        <div class="container-fluid">
            
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">

                    <span class="sr-only">Toggle navigation</span>
                    <span class="big-icon icon-bar"></span>
                    <span class="big-icon icon-bar"></span>
                    <span class="big-icon icon-bar"></span>

                </button>
                <a class="navbar-brand" href="/">zsc</a>
            </div>

            <div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1" style="height: auto;">
                <ul class="nav navbar-nav navbar-right" style="font-size: 100%">
                    
                        
                            
                            <li class=""><a href="/about/">About</a></li>
                            
                            <li class=""><a href="/categories/">Categories</a></li>
                            
                            <li class=""><a href="/">Home</a></li>
                            
                            <li class=""><a href="/tags/">Tags</a></li>
                            
                            <li class=""><a href="/issue/">存在的问题</a></li>
                            
                        
                    
                </ul>
            </div>
        </div>
    </nav>










<div class="inner">
    



    <div class="blog-post">
        
                <div>
            <h2 align="center" id = "singe-h2">
                mac重装系统3系统设置
                <time>
                    <br>
                    <span> 
                        <i class="fa fa-user-edit" style="color:#888;font-size: 80%;"></i>
                        zsc 
                    </span>
                    &nbsp 
                    <span>                 
                        <i class="fa fa-calendar-alt" style="color:#888;font-size: 80%;"></i>
                        2020-10-05 
                    </span>
                </time>
                
                
                <div>
                    <ul class="tags">
                        
                        <span>标签:</span>
                        <li><a class="link" href="/tags/mac"> #mac </a></li>
                        
                        <span> </span>
                        
                        <span>分类:</span>
                        <li><a class="link" href="/categories/mac%e7%b3%bb%e7%bb%9f%e8%ae%be%e7%bd%ae"> @mac系统设置 </a></li>
                        
                    </ul>
                    
                </div>
            </h2>
        </div>
    
        
        <section id="content">
            <h1 id="mac-系统的设置">mac 系统的设置</h1>
<p>新系统, 首先我们要安装一些必要的软件,和做一些基本的设置.</p>
<p>本文做一些基本的设置</p>
<h2 id="更改终端的颜色-和主机名">更改终端的颜色 和主机名</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo echo <span style="color:#e6db74">&#34;export CLICOLOR=1&#34;</span> &gt;&gt; ~/.bash_profile
</span></span><span style="display:flex;"><span>sudo echo <span style="color:#e6db74">&#34;export LSCOLORS=gxfxcxdxbxegedabagacad&#34;</span> &gt;&gt; ~/.bash_profile
</span></span><span style="display:flex;"><span>sudo echo <span style="color:#e6db74">&#34;export PS1=&#39;\[\e[01;33m\][\[\e[01;35m\]\u\[\e[01;33m\]@\[\e[01;34m\]\h:\[\e[01;33m\]] \[\e[01;36m\]\w \[\e[01;32m\]\$ &#39;&#34;</span>&gt;&gt; ~/.bash_profile
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>source ~/.bash_profile 
</span></span></code></pre></div><p>参考:  <a href="2019-11-19mac%E7%BB%88%E7%AB%AF%E6%A0%B7%E5%BC%8FPS1">2019-11-19mac终端样式PS1</a></p>
<p>命令行更改主机名</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>scutil --set HostName lucky  <span style="color:#75715e"># 重启终端</span>
</span></span><span style="display:flex;"><span>hostname   <span style="color:#75715e">#查看主机名</span>
</span></span></code></pre></div><ul>
<li>备注： 还有在mac中使用vim, 可以有更好的方法 使用sublime</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>vim a.txt 
</span></span><span style="display:flex;"><span><span style="color:#75715e"># 可以用  </span>
</span></span><span style="display:flex;"><span>subl a.txt
</span></span><span style="display:flex;"><span>open a.txt
</span></span></code></pre></div><h2 id="以下看情况设置">以下看情况设置</h2>
<ul>
<li>如果不能用则设置</li>
</ul>
<h3 id="设置网络的dns">设置网络的DNS.</h3>
<p>打开&ndash;<code>wifi</code> &mdash;&raquo; <code>高级</code>&mdash;&gt; 设置 DNS  ,</p>
<p>添加</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>114.114.114.114
</span></span><span style="display:flex;"><span>8.8.8.8
</span></span></code></pre></div><h3 id="修改etchosts">修改<code>/etc/hosts</code></h3>
<ul>
<li>
<p>不推荐 修改这个文件啦</p>
</li>
<li>
<p>找到一个更好用的软件，  <a href="https://gitee.com/docmirror/dev-sidecar">https://gitee.com/docmirror/dev-sidecar</a> 因此可以不设置<code>/etc/hosts</code> 文件啦</p>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>$ sudo vim /etc/hosts
</span></span><span style="display:flex;"><span><span style="color:#75715e">#### 把下面的信息添加到 该文件中即可</span>
</span></span><span style="display:flex;"><span>199.232.69.194   github.global.ssl.fastly.net
</span></span><span style="display:flex;"><span>140.82.113.4      github.com
</span></span><span style="display:flex;"><span>199.232.69.194    github.global.ssl.fastly.net
</span></span><span style="display:flex;"><span>185.199.110.153   assets-cdn.github.com
</span></span><span style="display:flex;"><span>140.82.113.4      gist.github.com
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#192.30.253.119    gist.github.com</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">#199.232.28.133    assets-cdn.github.com</span>
</span></span><span style="display:flex;"><span>199.232.68.133    raw.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    gist.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    cloud.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    camo.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    avatars0.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    avatars1.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    avatars2.githubusercontent.com
</span></span><span style="display:flex;"><span>199.232.68.133    avatars3.githubusercontent.com
</span></span></code></pre></div><p><a href="https://blog.csdn.net/Newbie_J/article/details/104467886/">链接1</a></p>
<p><a href="https://blog.csdn.net/u010828718/article/details/106500543?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~sobaiduend~default-1-106500543.nonecase&amp;utm_term=github%E4%B8%8A%E7%9A%84%E5%9B%BE%E7%89%87%E6%97%A0%E6%B3%95%E6%98%BE%E7%A4%BA%20mac&amp;spm=1000.2123.3001.4430">链接2</a></p>
<p>下一节,讲解软件的安装(主要用<code>homebrew</code>),如果上述不设置,可能软件安装不了</p>

        </section>
    </div>
    <br>
    
    




<span id="/macnote/mac%E9%87%8D%E8%A3%85%E7%B3%BB%E7%BB%9F3%E7%B3%BB%E7%BB%9F%E8%AE%BE%E7%BD%AE/" class="leancloud_visitors" data-flag-title="mac重装系统3系统设置">
  <span class="post-meta-item-text">文章总阅读量 </span>
  <span class="leancloud-visitors-count"><i class="leancloud-visitors-count"></i></span>次;
  <p></p>
</span>



    

    
    
    <button id="edit-button" class="icon-button" type="button" title="Fork and edit" aria-label="Fork and edit" aria-haspopup="true" aria-expanded="false" aria-controls="edit">
        <i class="fa fa-edit">编辑本文</i>
    </button>
    
    
    

    <br>
    <hr>
    <li style="float:left;list-style:none">
        
        <a class="previous" href="/macnote/mac%E9%87%8D%E8%A3%85%E7%B3%BB%E7%BB%9F2%E7%B3%BB%E7%BB%9F%E5%88%B6%E4%BD%9C%E4%B8%8E%E5%AE%89%E8%A3%85/"> 上一篇: mac重装系统2系统制作与安装</a>
        
    </li>
    <li style="float:right;list-style:none">
        
        <a class="next" href="/macnote/mac%E9%87%8D%E8%A3%85%E7%B3%BB%E7%BB%9F4%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/"> 下一篇: mac重装系统4软件安装</a>
        
    </li>
     
    
    <script src="/js/copyCode.js"></script>
    <script src="/js/tooltips.js"></script>
    
   
    <script>
    [].slice.call(document.querySelectorAll('table')).forEach(function(el) {
        var wrapper = document.createElement('div');
        wrapper.className = 'table-area';
        el.parentNode.insertBefore(wrapper, el);
        el.parentNode.removeChild(el);
        wrapper.appendChild(el);
        $("table").wrap("<div class='table-area'></div>");
    })
    </script>

    
<br>
<hr>


<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111691389-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() { dataLayer.push(arguments); }
  gtag('js', new Date());

  gtag('config', 'UA-111691389-1');
</script>




      
      
      

       
      
      
      <script>
              document.getElementById("edit-button").addEventListener("click", function () {
                  var editWindow = window.open("https:\/\/github.com\/zoushucai\/blogmmm/edit/master/content/macnote\/mac重装系统3系统设置.md");
              });</script>
      
          




<script>
  function resizeIframe(obj) {
    obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
  } 
</script>



    </style>
    <script type="text/javascript">
    function showdiv(){
        document.getElementById("divtocTableOfContents").style.display="block";
        document.getElementById("strHref").innerHTML="目录收起-";
        document.getElementById('divTableOfContents').style.width="22%";
        document.getElementById('divTableOfContents').style.height="55%";
        document.getElementById('divTableOfContents').style.top="25%";
        document.getElementById('divTableOfContents').style.bottom="5%";
        document.getElementById("strHref").href="javascript:hidediv()";
    }
    function hidediv(){
        document.getElementById("divtocTableOfContents").style.display="none";
        document.getElementById("strHref").innerHTML="目录展开+";
        document.getElementById("strHref").href="javascript:showdiv()";
        document.getElementById('divTableOfContents').style.width="10%";
        document.getElementById('divTableOfContents').style.height="5%";
    }
    </script>
</body>

</html>
</div> 







    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mathtex-script-type.min.js" integrity="sha384-LJ2FmexL77rmGm6SIpxq7y+XA6bkLzGZEgCywzKOZG/ws4va9fUVu2neMjvc3zdv" crossorigin="anonymous"></script>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"></script>
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            renderMathInElement(document.body, {
            delimiters: [
                            {left: "$$", right: "$$", display: true},
                            {left: "$", right: "$", display: false},
                            {left: "\\(", right: "\\)", display: false},
                            {left: "\\[", right: "\\]", display: true}
                        ]
            });
        });
    </script>













<br>
<div class="inner">
              
            
          
          
  
          
  
  <div id="vcomments"></div>
  
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  
  <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
  <script type="text/javascript">
    new Valine({
        el: '#vcomments' ,
        appId: 'HfHPKPkLa0cBEDPcdBAHuqMv-gzGzoHsz',
        appKey: 'r5RJAasN8e0mB9sq6y9pEcX0',
        lang:'zh-CN',
        notify:  false , 
        verify:  false  ,
        avatar:'identicon', 
        placeholder: '说点什么吧...',
        visitor:  true 
    });
  </script>

</div>

<br>
<br>
<footer>
    <p style="float:right;margin-right: 5%;margin-top: 0%;">
        &copy; 2022 <a href="https://github.com/zoushucai">zsc</a>
      </p>
</footer>
<br>
<br>


